<div class="bh-content">
	<div class="bh-ly-jj-lvviews_con bh-padT10">
	<div class="bh-ly-jj-lyview_conL bh-fl">
        	<h2 class="bh-ly-yw-shang">热门城市</h2>
            <div class="bh-pj-chufa">
            	<?php  $this->widget('lib.ext.data.DataWidget',array(
	          		'model' => new CompanyScenic,
            		'data' => array(
            			'attribute' => 'province',
            			'data' => CityRecommend::typeCityList(CityRecommend::TYPE_INDEX_SCENIC, 0),
            			'action' => 'scenicList'
            		),
	          		'view' => 'application.views.partials.public.city_list'
	          	))?>
           	</div>
        </div>
	<div class="bh-ly-jj-lyview_conR bh-Border_1 bh-fr">
        <h3 class="bh-ly-jj-con_rgbt bh-ly-jj-borderB bh-mBt10"><?php echo $model->fullTitle?></h3>
		<div class="bh-ly-jj-lvxianlu1">
            	<div class="bh-fl"><a href="javascript:void(0)"><?php echo $model->img(370,320);?></a></div>
                <div class="bh-ly-jj-xianlu-buy bh-fl bh-mlt30">
                	<table class="bh-ly-jj-xianlu_buytab"  width="100%">
                    	<tr>
                        	<td class="bh-textRt" width=67>景区星级：</td>
                            <td class="bh-textLt" width='280'><?php echo Yii::app()->enum->lookUp('basic.scenicStar',$model->star)?></td>
                        </tr>
                        <tr>
                        	<td class="bh-textRt">景区地址：</td>
                            <td class="bh-textLt"><?php echo $model->DetailProvince.' '.$model->address?></td>
                        </tr>
                    </table>
                    <div class='hvc-w'>
                    	<div class='hvc-title'>
                    		<?php $commentRateArr = GoodsComment::radeArrayData('Scenic',$model->id);?>
                    		<span class='hvc-name'>景区点评：</span>
                    		<span class='hvc-more'>
                    		<a href='<?php echo Yii::app()->controller->createUrl('comment',array('type'=>'Scenic','id'=>$model->id))?>' class='a-blue'>更多<?php echo $commentRateArr['count'];?>条点评</a></span>
                    		<div class='bh-clear'></div>
                    	</div>
                    	<div class='hvc-precent-w'>
                    		<div class='hvc-precent-total'>
                    			<span><?php echo $commentRateArr['goodsRateModulus']+$commentRateArr['centerRateModulus']?>%</span>
                    			<p>用户满意度</p>
                    		</div>
                    		<div class='hvc-precent-detail'>
                    			<p><span>好评：</span><span class='praisePercent'><span style='width:<?php echo $commentRateArr['goodsRateModulus']?>%'></span></span><?php echo $commentRateArr['goodsRateModulus']?>%</p>
                    			<p><span>中评：</span><span class='praisePercent'><span style='width:<?php echo $commentRateArr['centerRateModulus']?>%'></span></span><?php echo $commentRateArr['centerRateModulus']?>%</p>
                    			<p><span>差评：</span><span class='praisePercent'><span style='width:<?php echo $commentRateArr['lessRateModulus']?>%'></span></span><?php echo $commentRateArr['lessRateModulus']?>%</p>
                    		</div>
                    		<div class='bh-clear'></div>
                    	</div>
                    	<div class='hvc-item-w'>
                    		<ul class='hvc-item'>
                    			<?php foreach (GoodsComment::model()->commentData('Scenic',$model->id, 3) as $one):?>
                    			<li><span class='hPlevel level_0<?php echo $one->rate?>'></span><?php echo $one->content?></li>
                    			<?php endforeach;?>
                    		</ul>
                    	</div>
                    </div>
                </div>
                <div class="bh-space"></div>
            </div>
        <div class="bh-space bh-ly-jj-borderB"></div>
            <div>
            	<h3 class="bh-ly-jj-con_rgbt">门票价格</h3>
            	<div class='hrp-w'>
            		<div class='hrp-w-inner'>
		            	<table width="639" border="0" class="bh-textCt tb-sku">
						<thead>
		                  <tr class="">
		                    <th>门票类型</th>
		                    <th>票面价</th>
		                    <th>优惠价</th>
		                    <th>供货商</th>
		                    <th>&nbsp;</th>
		                  </tr>
						  <thead>
		                  <?php foreach ($model->goods as $item):?>
							<tr>
								<td><?php echo $item->ticket_type?></td>
								<td class='td-delete'>￥<?php echo intval(CHtml::value($item, 'goods.priceInfo.price_market'))?></td>
								<td class="font-clr bh-strong fs-14">￥<?php echo intval(CHtml::value($item, 'goods.priceInfo.price_dealer'))?></td>
								<td><a href=<?php echo Yii::app()->createUrl('shop/index',array('uid'=>CHtml::value($item, 'goods.provider_id')))?> target='_bank'><?php echo CHtml::value($item, 'goods.provider.profile.nickname')?></a></td>
								<td>
                                <a class='jj-hotel-yuding' href="<?php echo $this->createUrl('channel/scenicWrite',array('id'=>$item->goods_id))?>">立即预订</a>
                                </td>
							</tr>
						<?php endforeach;?>
		            </table>
		        </div>
	        </div>
			<div class="bh-space"></div>
			<div class="bh-space"></div>

			<div class='goods-desc-item'>
            	<h1 class='goods-desc-title'><span>景区图片</span></h1>
        		<div class='goods-img-w'>
        			<?php
        				$photos = $model->photoItems;
        				$first = is_array($photos) ? array_shift($photos) : '';
        			?>
        			<?php if (is_object($first)):?>
                	<div class='goods-img-l'>
                		<a href='<?php echo $first->getAccessUrl('path')?>' rel=image_preview_group>
                			<?php echo $first->img(190,141)?>
                		</a>
                	</div>
                	<?php endif;?>
                	<div class='goods-img-r'>
                		<?php if (is_array($photos)):?>
                		<ul>
                			<?php $i=0;foreach ($photos as $one):?>
                			<?php ++$i;if ($i==12) break;?>
                			<li>
                				<a href='<?php echo $one->getAccessUrl('path')?>' rel=image_preview_group>
                					<?php echo $one->img(90,70)?>
                				</a>
                			</li>
                			<?php endforeach;?>
                		</ul>
                		<?php endif;?>
                </div>
                <div class='bh-clear'></div>
            </div>


			<div class='goods-desc-item'>
            	<h1 class='goods-desc-title'><span>景区介绍</span></h1>
        		<div class='goods-desc-content'>
                	<?php echo CHtml::value($model, 'desc')?>
                </div>
            </div>

            <div class='goods-desc-item' id='comment'>
				<!-- 评论 -->
            </div>
      </div>
		<div class="bh-space"></div>
      </div>
    </div>
    <div class="bh-space"></div>
</div>

<?php $this->widget('lib.ext.fancybox.EFancyBox', array(
	'target' => 'a[rel=image_preview_group]',
	'config' => array(
		'transitionIn'=>'none',
		'transitionOut'=> 'none',
		'titlePosition'=>'over',
		'titleFormat' => 'js:function(title, currentArray, currentIndex, currentOpts) {
			return \'<span id="fancybox-title-over">\' + (currentIndex + 1) + \' / \' + currentArray.length + (title.length ? \' &nbsp; \' + title : \'\') + \'</span>\';
		}',
	),
))?>
<script>
$().ready(function() {
	$.get('<?php echo Yii::app()->createUrl('provide/goodsComment/list');?>', {'title':'景区','type':'Scenic', 'id':'<?php echo $model->id?>'},function(content) {
		$('#comment').html(content);
	});
});
</script>